home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / standards / CCITT / 1992 / X / x509_1.asc < prev    next >
Encoding:
Text File  |  1993-07-15  |  68.0 KB  |  1,279 lines

  1.          The drawings contained in this Recommendation have been done in AUTOCAD
  2.          Recommendation X.509
  3.                            THE DIRECTORY - AUTHENTICATION FRAMEWORK 1
  4.                                          (Melbourne, 1988)
  5.                                               CONTENTS
  6.          0      Introduction
  7.          1      Scope and field of application
  8.          2      References
  9.          3      Definitions
  10.          4      Notation and abbreviations
  11.          SECTION 1 - Simple authentication
  12.          5      Simple authentication procedure
  13.          SECTION 2 - Strong authentication
  14.          6      Basis of strong authentication
  15.          7      Obtaining a user's public key
  16.          8      Digital signatures
  17.          9      Strong authentication procedures
  18.          10     Management of keys and certificates
  19.          Annex A - Security requirements
  20.          Annex B - An introduction to public key cryptography
  21.          Annex C - The RSA public key cryptosystem
  22.          Annex D - Hash functions
  23.          Annex E - Threats protected against by the strong authentication method
  24.          Annex F - Data confidentiality
  25.          Annex G - Authentication framework in ASN.1
  26.          Annex H - Reference definition of algorithm object identifiers
  27.          0      Introduction
  28.          0.1    This document, together with the others of the series, has  been  produced
  29.          to facilitate the interconnection of information processing  systems  to  provide
  30.          directory services.  The set of all such systems,  together  with  the  directory
  31.          information which they hold, can be viewed as an  integrated  whole,  called  the
  32.          Directory. The information held by  the  Directory,  collectively  known  as  the
  33.          Directory Information Base (DIB), is typically used to  facilitate  communication
  34.          between,  with  or  about  objects  such  as  OSI  application-entities,  people,
  35.          terminals and distribution lists.
  36.          0.2    The Directory plays a significant role in  Open  Systems  Interconnection,
  37.          whose aim is to allow, with a minimum  of  technical  agreement  outside  of  the
  38.          interconnection  standards  themselves,  the   interconnection   of   information
  39.          processing systems:
  40.                -   from different manufacturers;
  41.                -   under different managements;
  42.                -   of different levels of complexity; and
  43.                -   of different ages.
  44.          0.3    Many applications  have  requirements  for  security  to  protect  against
  45.          threats to  the  communication  of  information.  Some  commonly  known  threats,
  46.          together with the security services and mechanisms that can be  used  to  protect
  47.          against them, are briefly described in Annex A. Virtually all  security  services
  48.          are dependent upon the identities of the  communicating  parties  being  reliably
  49.          known, i.e. authentication.
  50.          0.4     This  Recommendation  defines  a   framework   for   the   provision   of
  51.          authentication services by the Directory to its users. These  users  include  the
  52.          Directory itself, as well as other applications and services. The  Directory  can
  53.          usefully be involved in meeting their needs for authentication and other security
  54.          services because it is a natural  place  from  which  communicating  parties  can
  55.          obtain authentication information of each other: knowledge which is the basis  of
  56.          authentication.  The  Directory  is  a  natural  place  because  it  holds  other
  57.          information  which  is  required  for  communication  and   obtained   prior   to
  58.          communication  taking  place.  Obtaining  the  authentication  information  of  a
  59.          potential communication partner  from  the  Directory  is,  with  this  approach,
  60.          similar to obtaining an address. Owing to the wide reach  of  the  Directory  for
  61.          communications purposes, it is expected that this authentication  framework  will
  62.          be widely used by a range of applications.
  63.  
  64.          1) Recomendations X.509 and ISSSO 9594-8, Information Processing Systems -   Open  Systems
  65.          Interconnection - The Directory  -  Authentication  Framework,  were  developed  in  close
  66.          collaboration and are technically aligned.
  67.  
  68.  
  69.  
  70.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  71.  
  72.          1      Scope and field of application
  73.          1.1    This Recommendation:
  74.                -   specifies the form of authentication information held by the Directory;
  75.                -   describes how authentication information  may  be  obtained  from  the
  76.                   Directory;
  77.                -   states the assumptions made about how this authentication  information
  78.                   is formed and placed in the Directory;
  79.                -   defines three ways in which applications may use  this  authentication
  80.                   information to perform authentication and describes how other  security
  81.                   services may be supported by authentication.
  82.          1.2     This  Recommendation  describes  two  levels  of  authentication:  simple
  83.          authentication, using a password as  a  verification  of  claimed  identity;  and
  84.          strong  authentication,  involving   credentials   formed   using   cryptographic
  85.          techniques. While simple authentication offers some  limited  protection  against
  86.          unauthorized access, only strong authentication should be used as the  basis  for
  87.          providing secure services. It is not intended to  establish  this  as  a  general
  88.          framework for authentication, but it can be of general use for applications which
  89.          consider these techniques adequate.
  90.          1.3    Authentication (and other security services) can only be  provided  within
  91.          the context of a defined security  policy.  It  is  a  matter  for  users  of  an
  92.          application to define their own security policy which may be constrained  by  the
  93.          services provided by a standard.
  94.          1.4    It  is  a  matter  for  standards  defining  applications  which  use  the
  95.          authentication framework to specify the  protocol  exchanges  which  need  to  be
  96.          performed in order  to  achieve  authentication  based  upon  the  authentication
  97.          information obtained from the Directory. The protocol  used  by  applications  to
  98.          obtain credentials from the Directory is the  Directory  Access  Protocol  (DAP),
  99.          specified in Recommendation X.519.
  100.          1.5    The strong authentication method specified in this Recommendation is based
  101.          upon public-key cryptosystems. It is a major advantage of such systems that  user
  102.          certificates may be held within the Directory as attributes, and  may  be  freely
  103.          communicated within the Directory System and obtained by users of  the  Directory
  104.          in the same manner as other Directory  information.  The  user  certificates  are
  105.          assumed to be formed by "off-line" means, and placed in the  Directory  by  their
  106.          creator. The generation of  user  certificates  is  performed  by  some  off-line
  107.          Certification Authority which  is  completely  separate  from  the  DSAs  in  the
  108.          Directory. In particular, no  special  requirements  are  placed  upon  Directory
  109.          providers to store or communicate user certificates in a secure manner.
  110.                A brief introduction to public-key cryptography can be found in Annex B.
  111.          1.6    In general, the authentication framework is not dependent on the use of  a
  112.          particular cryptographic algorithm, provided it has the properties  described  in
  113.           6.1. Potentially  a number of different algorithms may  be  used.  However,  two
  114.          users wishing to authenticate must support the same cryptographic  algorithm  for
  115.          authentication to be performed correctly. Thus, within the context of  a  set  of
  116.          related applications, the choice of a single algorithm will serve to maximize the
  117.          community of users able to authenticate and communicate securely. One example  of
  118.          a public key cryptographic algorithm can be found in Annex C.
  119.          1.7    Similarly, two users wishing to authenticate must support  the  same  hash
  120.          function (see  3.3 f)) (used in forming credentials and  authentication  tokens).
  121.          Again, in principle, a number of alternative hash functions could be used, at the
  122.          cost of narrowing  the  communities  of  users  able  to  authenticate.  A  brief
  123.          introduction to hash functions together with one example  hash  function  can  be
  124.          found in Annex D.
  125.          2      References
  126.          2.1    ISO 7498-2: Information Processing Systems - Open Systems  Interconnection
  127.          - Security Architecture.
  128.          3      Definitions
  129.          3.1    This Recommendation makes use of the  following  general  security-related
  130.          terms defined in Part 2 of the OSI Reference Model on Security:
  131.                a)  asymmetric (encipherment);
  132.                b)  authentication exchange;
  133.                c)  authentication information;
  134.                d)  confidentiality;
  135.                e)  credentials;
  136.                f)  cryptography;
  137.  
  138.  
  139.  
  140.  
  141.          PAGE6   Fascicle VIII.8 - Rec.X.509
  142.  
  143.                g)  data origin authentication;
  144.                h)  decipherment;
  145.                i)  encipherment;
  146.                j)  key;
  147.                k)  password;
  148.                l)  peer-entity authentication;
  149.                m)  symmetric (encipherment).
  150.          3.2     The  following  terms  used  in  this  Recommendation  are   defined   in
  151.          Recommendation X.501:
  152.                a)  attribute;
  153.                b)  Directory Information Base;
  154.                c)  Directory Information Tree;
  155.                d)  distinguished name;
  156.                e)  entry;
  157.                f)  object;
  158.                g)  root.
  159.          3.3    The following specific terms are defined and used in this Recommendation:
  160.                a)  authentication token (token): information  conveyed  during  a  strong
  161.                   authentication exchange, which can be used to authenticate its sender;
  162.                b)  user certificate (certificate): the public keys of  a  user,  together
  163.                   with some other information, rendered unforgeable by encipherment  with
  164.                   the secret key of the certification authority which issued it;
  165.                c)  certification authority: an authority trusted by one or more users  to
  166.                   create and assign certificates. Optionally the certification  authority
  167.                   may create the user's keys;
  168.                d)  certification path: an ordered sequence of certificates of objects  in
  169.                   the DIT which, together with the public key of the  initial  object  in
  170.                   the path, can be processed to obtain that of the final  object  in  the
  171.                   path;
  172.                e)  cryptographic system, cryptosystem: a  collection  of  transformations
  173.                   from  plain  text  into  ciphertext  and  vice  versa,  the  particular
  174.                   transformation(s)  to   be   used   being   selected   by   keys.   The
  175.                   transformations are normally defined by a mathematical algorithm.
  176.                f)  hash function: a (mathematical) function which maps values from a large 
  177.                   (possibly very large) domain  into  a  smaller  range.  A  "good"  hash
  178.                   function is such that the results of applying the function to a (large)
  179.                   set of values in the domain will be evenly distributed (and  apparently
  180.                   at random) over the range;
  181.                g)  one-way function: a (mathematical) function f which is easy to compute, 
  182.                   but which for a general value y in the  range,  it  is  computationally
  183.                   difficult to find a value x in the domain such that f(x) = y. There may
  184.                   be a few values y for which finding x is not computationally difficult;
  185.                h)  public key: (in a public key cryptosystem) that key of  a  user's  key
  186.                   pair which is publicly known;
  187.                i)  private key (secret key - deprecated): (in a public key  cryptosystem)
  188.                   that key of a user's key pair which is known only by that user;
  189.                j)  simple authentication: authentication  by  means  of  simple  password
  190.                   arrangements;
  191.                k)  security policy: the set of rules laid down by the security  authority
  192.                   governing the use and provision of security services and facilities;
  193.                l)  strong authentication: authentication by  means  of  cryptographically
  194.                   derived credentials;
  195.                m)  trust: generally, an entity can be said to "trust" a second entity when 
  196.                   it (the first entity) makes the assumption that the second entity  will
  197.                   behave exactly as the first entity expects. This trust may  apply  only
  198.                   for some specific function. The key role of trust in the authentication
  199.                   framework is to describe the  relationship  between  an  authenticating
  200.                   entity and a certification authority; an authenticating entity must  be
  201.                   certain that it can trust the certification authority  to  create  only
  202.                   valid and reliable certificates;
  203.                n)  certificate serial number: an integer value, unique within the issuing
  204.                   CA, which is unambiguously associated with a certificate issued by that
  205.                   CA.
  206.          4      Notation and abbreviations
  207.          4.1    The notation used in this  Recommendation  is  defined  in  Table  1/X.509
  208.  
  209.  
  210.  
  211.  
  212.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  213.  
  214.           below.
  215.                 Note - In the table, the symbols X, X1, X2  etc.  occur  in  place  of  the
  216.           names of users, while the symbol I occurs in place of arbitrary information.
  217.           4.2    The following abbreviations are used in this Recommendation:
  218.                 CA      Certification Authority
  219.                 DIB     Directory Information Base
  220.                 DIT     Directory Information Tree
  221.                 PKCS   Public key cryptosystem.
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.           PAGE6   Fascicle VIII.8 - Rec.X.509
  284.  
  285.                                                 TABLE 1/X.509
  286.                                                   Notation
  287.                NOTATION                               MEANING
  288.           Xp                  Public key of a user X.
  289.           Xs                  Secret key of X.
  290.           Xp[I]               Encipherment of some information, I, using  the  public
  291.                               key of X.
  292.           Xs[I]               Encipherment of I using the secret key of X
  293.           X {I}               The signing of I by user X. It consists of  I  with  an
  294.                               enciphered summary appended.
  295.           CA(X)               A certification authority of user X.
  296.           CAn(X)               (where n > 1): CA(CA(...n times...(X))).
  297.           X1<<X2>>             The certificate of  user  X2  issued  by  certification
  298.                               authority X1.
  299.           X1<<X2>>X2<<X3>>     A chain of certificates (can be of  arbitrary  length),
  300.                               where  each   item   is   the   certificate   for   the
  301.                               certification authority which produced the next. It  is
  302.                               functionally equivalent to  the  following  certificate
  303.                               X1<<Xn+1>>. F r  example,  possession  of  A<<B>>B<<C>>
  304.                               provides the same  capability  as  A<<C>>,  namely  the
  305.                               ability to find out Cp given Ap.
  306.           X1p.X1<<X2>>         The  operation  of   unwrapping   a   certificate   (or
  307.                               certificate chain) to extract a public key.  It  is  an
  308.                               infix operator, whose left operand is the public key of
  309.                               a certification authority, and whose right operand is a
  310.                               certificate issued by that certification authority. The
  311.                               outcome is the public key of the user whose certificate
  312.                               is the right operand. For example:
  313.                                                   Ap.A<<B>>B<<C>>
  314.                               denotes the operation of using the public key of  A  to
  315.                               obtain  B's  public  key,  Bp,  from  its  certificate,
  316.                               followed by using Bp to  unwrap  C's  certificate.  The
  317.                               outcome of the operation is the public key of C, Cp.
  318.          A « B                A certification path from A to B, formed of a chain  of
  319.                               certificates starting with CA(A)<<CA2(A)>>  and  ending
  320.                               with CA(B)<<B>>.
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  355.  
  356.          SECTION 1 - Simple authentication
  357.          5      Simple authentication procedure
  358.          5.1    Simple authentication is intended to  provide  local  authorization  based
  359.          upon a Distinguished Name of a user, bilaterally agreed (optional) password and a
  360.          bilateral understanding of the means of using and handling this password within a
  361.          single domain. Utilization of Simple Authentication  is  primarily  intended  for
  362.          local use only, i.e. for peer entity authentication between one DUA and  one  DSA
  363.          or between one DSA and one DSA. Simple authentication may be achieved by  several
  364.          means:
  365.                a)  the transfer of the user's distinguished name and (optional)  password
  366.                   in the clear (non- protected) to the recipient for evaluation;
  367.                b)  the transfer of the user's distinguished name, password, and a  random
  368.                   number and/or a timestamp, all of which are protected by applying a one
  369.                   way function;
  370.                c)  the transfer of the protected information described in b) together with 
  371.                   a random number and/or timestamp, all of which is protected by applying
  372.                   a one-way function.
  373.                Note 1 - There is no requirement that  the  one-way  functions  applied  be
  374.          different.
  375.                Note 2 - The signalling of procedures for protecting  passwords  may  be  a
  376.          matter for extension to the Document.
  377.          5.2    Where passwords are  not  protected,  a  minimal  degree  of  security  is
  378.          provided for preventing unauthorized access. It should not be considered a  basis
  379.          for secure services.  Protecting  the  user's  distinguished  name  and  password
  380.          provides greater  degrees  of  security.  The  algorithms  to  be  used  for  the
  381.          protection mechanism are typically non-enciphering  one-way  functions  that  are
  382.          very simple to implement.
  383.          5.3    The general procedure for achieving  simple  authentication  is  shown  in
  384.          Figure 1/X.509.
  385.                                           FIGURE 1/X.509 - 0704380
  386.  
  387.          5.3.1  The following steps are involved:
  388.                1)  an originating user A sends its distinguished name and password  to  a
  389.                   recipient user B;
  390.                2)  B sends the purported distinguished name and  password  of  A  to  the
  391.                   Directory, where the password is checked against that held as the  User
  392.                   Password attribute within the directory entry for A (using the  Compare
  393.                   operation of the Directory);
  394.                3)  the Directory confirms (or denies) to B that the credentials are valid;
  395.                4)  the success (or failure) of authentication may be conveyed to A.
  396.          5.3.2  The most basic form of simple authentication involves  only  step  1)  and
  397.          after B has checked the distinguished name and password, may include step 4).
  398.          5.4    Figure 2/X.509 illustrates two approaches by which  protected  identifying
  399.          information may be generated. f1 and f2 are one-way functions  (either  identical
  400.          or different) and the timestamps and random numbers are optional and  subject  to
  401.          bilateral agreements.
  402.                                         FIGURE 2/X.509 - T0704390-88
  403.  
  404.                A       = user's distinguished name
  405.                tA      = timestamps
  406.                passwA    = password of A
  407.                qA      = random numbers, optionally with a counter included
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.          PAGE6   Fascicle VIII.8 - Rec.X.509
  426.  
  427.          5.4.1   Figure  3/X.509  illustrates   the   procedure   for   protected   simple
  428.          authentication.
  429.                                         FIGURE 3/X.509 - T0704400-88
  430.  
  431.                The following steps are involved (initially using f1 only):
  432.                1)   An  originating  user,  User  A,  sends  its  protected   identifying
  433.                   information (Authenticator1) to  User  B.  Protection  is  achieved  by
  434.                   applying the  one-way  function  (f1)  of  Figure  2/X.509,  where  the
  435.                   timestamp and/or random number (when used) is to minimize replay and to
  436.                   conceal the password.
  437.                   The protection of A's password is of the form:
  438.                      Protected1 = f1 (t1A, q1A, passwA).
  439.                   The information conveyed to B is of the form:
  440.                      Authenticator1 = t1A, q1A, A, Protected1.
  441.                   B verifies the  protected  identifying  information  offered  by  A  by
  442.                   generating (using the timestamp, distinguished  name  and,  optionally,
  443.                   additional timestamp and/or random number provided by A, together  with
  444.                   a local copy of A's password) a local protected copy  of  A's  password
  445.                   (of the form of Protected1). B compares (for  equality)  the  purported
  446.                   identifying information (Protected1) with the locally generated value).
  447.                2)  B confirms  (or  denies)  to  A  the  verification  of  the  protected
  448.                   identifying information.
  449.          5.4.2  The procedure of  5.4.1 can  be  modified  to  afford  greater  protection
  450.          (using f1 and f2).
  451.                The main differences are as follows:
  452.                1)   A  sends  its  (additionally)   protected   identifying   information
  453.                   (Authenticator2) to B.  Additional protection is achieved by applying a
  454.                   further one-way function, f2, as illustrated  in  Figure  2/X.509.  The
  455.                   further protection is of the form:
  456.                      Protected2 = f2 (t2A, q2A, Protected1).
  457.                   The information conveyed to B is of the form:
  458.                      Authenticator2 = t1A, t2A, q1A, q2A, A, Protected2.
  459.               For comparison, B generates a local  value  of  A's  additionally  protected
  460.               password and compares it (for equality) with that of Protected2. (Similar in
  461.               principle to step 1) of    5.4.1.)
  462.                2)  B confirms  (or  denies)  to  A  the  verification  of  the  protected
  463.                   identifying information.
  464.                Note - The procedures defined in this  are specified in terms of A  and  B.
  465.          As applied to the Directory (specified in  Recommendation  X.511  and  X.518),  A
  466.          could be a DUA binding to a DSA, B; alternatively A could be  a  DSA  binding  to
  467.          another DSA, B.
  468.          5.5    A User Password attribute type contains the password  of  an  object.   An
  469.          attribute value for the user password is a string specified by the object.
  470.                UserPassword ::=        ATTRIBUTE
  471.                          WITH    ATTRIBUTE-SYNTAX
  472.                                  OCTET STRING (SIZE (0..ub-user-password))
  473.                                  MATCHES FOR EQUALITY
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  497.  
  498.          5.6    The following ASN.1 macro may be used to define the data type arising from
  499.          applying a one-way function to a given other data type.
  500.                PROTECTED MACRO ::= SIGNATURE
  501.          SECTION 2 - Strong authentication
  502.          6      Basis of strong authentication
  503.          6.1    The approach to strong authentication taken in this  Recommendation  makes
  504.          use of the properties of a family of cryptographic systems, known  as  public-key
  505.          cryptosystems (PKCS). These cryptosystems, also described as asymmetric,  involve
  506.          a pair of keys, one secret and one  public,  rather  than  a  single  key  as  in
  507.          conventional cryptographic systems. Annex B gives a brief introduction  to  these
  508.          cryptosystems and the properties which make them useful in authentication. For  a
  509.          PKCS to be usable in this authentication framework, at the present time, it  must
  510.          have the property that both keys in the key pair can  be  used  for  encipherment
  511.          with the secret key being used to decipher if the public key was  used,  and  the
  512.          public key being used to decipher if the secret key was used. In other                      words  Xp
  513.          .Xs  Xs .  p  where  Xp/Xs  are  encipherment/decipherment  functions  using  the
  514.          public/secret keys of user X.
  515.                Note- lternative types of  PKCS,  i.e.,  ones  which  do  not  require  the
  516.          property of permutability and that can be supported without great modification to
  517.          this Recommendation, are a possible future extension.
  518.          6.2    This authentication framework does not mandate a  particular  cryptosystem
  519.          for use.  It is intended that the framework will be applicable  to  any  suitable
  520.          public key cryptosystem, and will thus support changes to the methods used  as  a
  521.          result  of  future  advances  in   cryptography,   mathematical   techniques   or
  522.          computational capabilities. However,  two  users  wishing  to  authenticate  must
  523.          support the same cryptographic  algorithm  for  authentication  to  be  performed
  524.          correctly. Thus, within the context of a set of related applications, the  choice
  525.          of a single algorithm will serve to maximize  the  community  of  users  able  to
  526.          authenticate and communicate securely. One example of a  cryptographic  algorithm
  527.          can be found in Annex C.
  528.          6.3    Authentication relies on each user possessing a unique distinguished name.
  529.          The allocation of  distinguished  names  is  the  responsibility  of  the  Naming
  530.          Authorities. Each user must therefore trust the Naming Authorities not  to  issue
  531.          duplicate distinguished names.
  532.          6.4    Each user is identified by its possession of its secret key. A second user
  533.          is able to determine if a communication partner is in possession  of  the  secret
  534.          key, and can use this to corroborate that the communication partner  is  in  fact
  535.          the user. The validity of this corroboration depends on the secret key  remaining
  536.          confidential to the user.
  537.          6.5    For a user to determine that a communication partner is in  possession  of
  538.          another user's secret key, it must itself be in possession of that user's  public
  539.          key. Whilst obtaining the value of this public key from the user's entry  in  the
  540.          Directory is straightforward, verifying  its  correctness  is  more  problematic.
  541.          There are many possible ways for doing this:  7 describes  a  process  whereby  a
  542.          user's public key can be checked by reference to the Directory. This process  can
  543.          only operate if there is an unbroken chain of trusted  points  in  the  Directory
  544.          between the users requiring to authenticate. Such a chain can be  constructed  by
  545.          identifying a common point of trust. This common point of trust must be linked to
  546.          each user by an unbroken chain of trusted points.
  547.          7      Obtaining a user's public key
  548.          7.1    In order for a user to trust the authentication procedure, it must  obtain
  549.          the other user's public key from a source that it trusts. Such a source, called a
  550.          certification authority (CA), uses the public key algorithm to certify the public
  551.          key, producing a certificate. The certificate, the form of which is specified  in
  552.           7.2 has the following properties:
  553.                -   any user with access to the public key of the certification  authority
  554.                   can recover the public key which was certified;
  555.                -   no party  other  than  the  certification  authority  can  modify  the
  556.                   certificate without this being detected (certificates are unforgeable).
  557.                Because certificates are  unforgeable,  they  can  be  published  by  being
  558.          placed in the Directory, without the need for the latter to make special  efforts
  559.          to protect them.
  560.                Note - Although the CAs are unambiguously defined by a  distinguished  name
  561.          in the DIT, this does not imply  that  there  is  any  relationship  between  the
  562.          organization of the CAs and the DIT.
  563.  
  564.  
  565.  
  566.  
  567.          PAGE6   Fascicle VIII.8 - Rec.X.509
  568.  
  569.          7.2    A certification authority produces the certificate of a  user  by  signing
  570.          (see  8) a collection of information, including the user's distinguished name and
  571.          public key.  Specifically, the certificate of a user with distinguished  name  A,
  572.          produced by the certification authority CA, has the following form:
  573.                CA<<A>> = CA {SN, AI, CA, A, Ap, TA}
  574.          where SN is the serial number of the certificate, AI is  the  identifier  of  the
  575.          algorithm used to sign the certificate, and TA indicates the period  of  validity
  576.          of the certificate, and consists of two dates, the first and last  on  which  the
  577.          certificate is valid. Since TA is assumed to be changed in periods not less  than
  578.          24 hours, it is expected that systems would use Coordinated Universal Time  as  a
  579.          reference time base. The signature in the certificate can be checked for validity
  580.          by any user with knowledge of CAP. The following ASN.1 data type can be  used  to
  581.          represent certificates.
  582.                Certificate ::=   SIGNED SEQUENCE{
  583.                   version                [0]Version DEFAULT 1988,
  584.                   serialNumber     SerialNumber,
  585.                   signature              Algorithmidentifier
  586.                   issuer           Name
  587.                   validity               Validity,
  588.                   subject                Name,
  589.                   subjectPublicKeyInfo SubjectPublicKeyInfo}
  590.                Version     ::=   INTEGER { 1988(0)}
  591.                SerialNumber      ::=   INTEGER
  592.                Validity    ::=
  593.                   SEQUENCE{
  594.                       notBefore        UTCTime,
  595.                       notAfter         UTCTime}
  596.                SubjectPublicKeyInfo    ::=
  597.                   SEQUENCE{
  598.                       algorithm        AlgorithmIdentifier
  599.                       subjectKey       BIT STRING}
  600.                AlgorithmIdentifier     ::=
  601.                   SEQUENCE{
  602.                       algorithm        OBJECT IDENTIFIER
  603.                       parameters       ANY DEFINED BY algorithm
  604.                                        OPTIONAL}
  605.          7.3    The directory entry of each  user,  A,  who  is  participating  in  strong
  606.          authentication, contains the certificate(s) of A. Such a certificate is generated
  607.          by a Certification Authority of A which is an entity in the DIT. A  Certification
  608.          Authority of A, which may not be unique, is denoted CA(A), or simply CA if  A  is
  609.          understood. The public key of A can thus be discovered by any  user  knowing  the
  610.          public key of CA. Discovering public keys is thus recursive.
  611.          7.4    If user A, trying to obtain the public key of user B, has already obtained
  612.          the public key of CA(B), then the process is complete. In order to  enable  A  to
  613.          obtain the public key  of  CA(B),  the  directory  entry  of  each  Certification
  614.          Authority, X, contains a number of certificates. These certificates  are  of  two
  615.          types. First there are forward certificates of X generated by other Certification
  616.          Authorities. Second there are reverse certificates generated by  X  itself  which
  617.          are the certified public keys of other certification authorities.  The  existence
  618.          of these certificates enables users to construct  certification  paths  from  one
  619.          point to another.
  620.          7.5    A list of certificates needed to allow a particular  user  to  obtain  the
  621.          public key of another, is known as a certification path. Each item in the list is
  622.          a certificate of the certification authority of the next  item  in  the  list.  A
  623.          certification path from A to B (denoted A -> B):
  624.                -   starts with a certificate produced by CA(A),  namely  CA(A)<<X1>>  for
  625.                   some entity X1;
  626.                -   continues with further certificates Xi<<Xi+1>>;
  627.                -   ends with the certificate of B.
  628.                A certification path logically forms an unbroken chain  of  trusted  points
  629.          in the Directory Information Tree between two users wishing to authenticate.  The
  630.          precise method employed by users A and B to obtain certification paths A«B and B«
  631.          A may vary. One way to facilitate this is to arrange a hierarchy  of  CAs,  which
  632.          may or may not coincide with all or part of the DIT  hierarchy.  The  benefit  of
  633.          this is that users who have CAs in the hierarchy may  establish  a  certification
  634.  
  635.  
  636.  
  637.  
  638.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  639.  
  640.          path between them using the Directory without any prior information. In order  to
  641.          allow for this each CA may store one  certificate  and  one  reverse  certificate
  642.          designated as corresponding to its superior CA.
  643.          7.6    Certificates are held within  directory  entries  as  attributes  of  type
  644.          UserCertificate, CACertificate and CrossCertificatePair.  These  attribute  types
  645.          are known to the Directory. These attributes can be operated on  using  the  same
  646.          protocol operations as other attributes. The definition of  these  types  may  be
  647.          found in  3.3 of this Recommendation, the specification of these attribute  types
  648.          is as follows:
  649.                UserCertificate   ::=   ATTRIBUTE
  650.                   WITH ATTRIBUTE-SYNTAX Certificate 
  651.                CACertificate     ::=   ATTRIBUTE
  652.                   WITH ATTRIBUTE-SYNTAX Certificate
  653.                CrossCertificatePair    ::=   ATTRIBUTE
  654.                   WITH ATTRIBUTE-SYNTAX CertificatePair
  655.                CertificatePair   ::=
  656.                   SEQUENCE{
  657.                       forward [o] Certificate OPTIONAL
  658.                       reverse [1] Certificate OPTIONAL
  659.                          - -at least one must be present --}
  660.          certificate bears the name of the Certification Authority which issued it.
  661.          7.7    In the general case, before users can mutually authenticate, the Directory
  662.          must supply the complete certification and return certification  paths.  However,
  663.          in practice, the amount of information which must be obtained from the  Directory
  664.          can be reduced for a particular instance of authentication by:
  665.                a)  if the two users that want to authenticate  are  served  by  the  same
  666.                   certification authority, then the certification path  becomes  trivial,
  667.                   and the users unwrap each other's certificates directly;
  668.                b)  if the CAs of the users are arranged in a hierarchy, a user could store 
  669.                   the  public  keys,  certificates  and  reverse  certificates   of   all
  670.                   certification authorities between the user and the  root  of  the  DIT.
  671.                   Typically, this would involve the user in knowing the public  keys  and
  672.                   certificates of only three or four certification authorities. The  user
  673.                   would then only require to obtain  the  certification  paths  from  the
  674.                   common point of trust;
  675.                c)  if a user frequently communicates with users certified by a particular
  676.                   other CA, that user could learn the certification path to that  CA  and
  677.                   the return certification path from that CA, making it necessary only to
  678.                   obtain the certificate of the other user itself from the directory;
  679.                d)  certification authorities can cross-certify one another  by  bilateral
  680.                   agreement.  The result is to shorten the certification path;
  681.                e)  if two users have communicated before and have learned  one  another's
  682.                   certificates, they are able to authenticate without any recourse to the
  683.                   Directory.
  684.                In  any  case,  having  learned  each   other's   certificates   from   the
  685.          certification  path,  the  users  must  check  the  validity  of   the   received
  686.          certificates.
  687.          7.8    (Example). Figure 4/X.509 illustrates a  hypothetical  example  of  a  DIT
  688.          fragment, where the CAs form a hierarchy. Besides the information  shown  at  the
  689.          CAs, we assume  that  each  user  knows  the  public  key  of  its  certification
  690.          authority, and its own public and secret keys.
  691.          7.8.1  If the CAs of the users are arranged in a hierarchy,  A  can  acquire  the
  692.          following certificates from the directory to establish a certification path to B:
  693.                X<<W>>, W<<V>>, V<<Y>>, Y<<Z>>, Z<<B>>
  694.                When A has obtained these certificates, it  can  unwrap  the  certification
  695.          path in sequence to yield the contents of the certificate of B, including Bp:
  696.                Bp = Xp . X<<W>> W<<V>> V<<Y>> Y<<Z>> Z<<B>>
  697.                In general, A also has to  acquire  the  following  certificates  from  the
  698.          directory to establish the return certification path from B to A:
  699.                Z<<Y>>, Y<<V>>, V<<W>>, W<<X>>, X<<A>>.
  700.                When B receives these  certificates  from  A,  it  can  unwrap  the  return
  701.          certification path in sequence to yield the contents of  the  certificate  of  A,
  702.          including Ap:
  703.                Ap = Zp .  Z<<Y>> Y<<V>> V<<W>> W<<X>> X<<A>>.
  704.                                         FIGURE 4/X.509 - T0704410-88
  705.  
  706.  
  707.  
  708.  
  709.          PAGE6   Fascicle VIII.8 - Rec.X.509
  710.  
  711.  
  712.          7.8.2  Applying the optimizations of  7.7:
  713.                a)  taking A and C, for example: both know Xp, so that  A  simply  has  to
  714.                   directly acquire the certificate of C.   Unwrapping  the  certification
  715.                   path reduces to:
  716.                   Cp = Xp . X<<C>>
  717.                   and unwrapping the return certification Path reduces to:
  718.                   Ap = Xp . X<<A>>
  719.                b)  assuming that A would thus know W<<X>>, Wp, V<<W>>,  Vp,  U<<V>>,  Up,
  720.                   etc., reduces the information which A has to obtain from the  directory
  721.                   to form the certification path to:
  722.                   V<<Y>>, Y<<Z>>, Z<<B>>
  723.                   and the information which A has to obtain from the  directory  to  form
  724.                   the return certification path to:
  725.                   Z<<Y>>, Y<<V>>
  726.                c)  assuming that A frequently communicates with users certified by Z,  it
  727.                   can learn (in addition to the public keys learned in b) above)  V<<Y>>,
  728.                   Y<<V>>, Y<<Z>>, and Z<<Y>>. To communicate with B,  it  need  therefore
  729.                   only obtain Z<<B>> from the directory;
  730.                d)  assuming that users certified by X and Z frequently communicate,  then
  731.                   X<<Z>> would be held in the directory entry for X, and vice versa (this
  732.                   is shown in Figure 4/X.509). If A wants to authenticate to  B,  A  need
  733.                   only obtain:
  734.                   X<<Z>>, Z<<B>>
  735.                   to form the certification path, and
  736.                   Z<<X>>
  737.                   to form the return certification path;
  738.                e)  assuming users A and C have communicated before and have  learned  one
  739.                   another's certificates, they may use each other's public key  directly,
  740.                   i.e.
  741.                   Cp = Xp . X<<C>>
  742.                   and
  743.                   Ap = Xp . X<<A>>.
  744.          7.8.3  In the more general case the Certification Authorities do not relate in  a
  745.          hierarchical manner. Referring to the hypothetical  example  in  Figure  5/X.509,
  746.          suppose a user D, certified by U, wishes to authenticate to user E, certified  by
  747.          W. The directory entry of user D will hold the certificate U<<D>> and  the  entry
  748.          of user E will hold the certificate W<<E>>.
  749.                Let V be a CA with whom CAs U and W have at some  previous  time  exchanged
  750.          public keys in a trusted way. As a result, certificates  U<<V>>,  V<<U>>,  W<<V>>
  751.          and V<<W>> have been generated and stored in the  Directory.  Assume  U<<V>>  and
  752.          W<<V>> are stored in the entry of V, V<<U>> is stored in U's entry, and V<<W>> is
  753.          stored in W's entry.
  754.                User D must find a certification path to E.  Various  strategies  could  be
  755.          used. One such strategy would be to regard the users and CAs as  nodes,  and  the
  756.          certificates as arcs in a directed graph, in these terms,  D  has  to  perform  a
  757.          search in the graph to find a path from U to E, one such  being  U<<V>>,  V<<W>>,
  758.          W<<E>>. When this path has been discovered,  the  reverse  path  W<<V>>,  V<<U>>,
  759.          U<<D>> can also be constructed.
  760.                                           FIGURE 5/X.509 - T0704420
  761.  
  762.          8      Digital signatures
  763.                This section is not intended to specify a standard for  digital  signatures
  764.          in general, but to specify the means by  which  the  tokens  are  signed  in  the
  765.          Directory.
  766.          8.1    Information (info) is signed by appending to it an enciphered  summary  of
  767.          the information. The summary is produced by means of  a  one-way  hash  function,
  768.          while the enciphering is carried out using the secret  key  of  the  signer  (see
  769.          Figure 6/X.509). Thus
  770.                X{Info} = Info,Xs[h (Info)]
  771.                Note - The encipherment using the secret key  ensures  that  the  signature
  772.          cannot be forged.  The one-way nature of the hash  function  ensures  that  false
  773.          information, generated so as to have the same hash result (and  thus  signature),
  774.          cannot be substituted.
  775.          8.2    The recipient of signed information verifies the signature by:
  776.  
  777.  
  778.  
  779.  
  780.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  781.  
  782.                -   applying the one-way hash function to the information;
  783.                -   comparing the result with that obtained by deciphering  the  signature
  784.                   using the public key of the signer.
  785.                                         FIGURE 6/X.509 - -0704430-88
  786.  
  787.          8.3    This authentication framework does  not  mandate  a  single  one-way  hash
  788.          function for use in signing. It is intended that the framework will be applicable
  789.          to any suitable hash function, and will thus support changes to the methods  used
  790.          as a result of  future  advances  in  cryptography,  mathematical  techniques  or
  791.          computational capabilities. However,  two  users  wishing  to  authenticate  must
  792.          support the same hash function for  authentication  to  be  performed  correctly.
  793.          Thus, within the context of a set of related applications, the choice of a single
  794.          function will serve to maximize the community of users able to  authenticate  and
  795.          communicate securely. An example hash function is specified in Annex D.
  796.                The signed  information  includes  indicators  that  identify  the  hashing
  797.          algorithm and the encryption algorithm used to compute the digital signature.
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.          PAGE6   Fascicle VIII.8 - Rec.X.509
  852.  
  853.          8.4    The encipherment of some data items may be described using  the  following
  854.          ASN.1 MACRO:
  855.                ENCRYPTED MACRO   ::=
  856.                BEGIN
  857.                TYPE NOTATION     ::=   type (ToBeEnciphered)
  858.                VALUE NOTATION    ::=   value (VALUE BIT STRING)
  859.                END
  860.                The value of the bit string is generated by taking the  octets  which  form
  861.          the complete encoding (using the ASN.1 Basic Encoding Rules) of the value of  the
  862.          ToBeEnciphered type and applying an encipherment procedure to those octets.
  863.                Note 1 - The encryption procedure requires agreement on  the  algorithm  to
  864.          be applied, including any parameters of the  algorithm,  such  as  any  necessary
  865.          keys, initialization values, and padding instructions. It is  the  responsibility
  866.          of the encryption procedures to specify the means by which synchronization of the
  867.          sender and receiver of data is achieved, which may  include  information  in  the
  868.          bits to be transmitted.
  869.                Note 2 - The encryption procedure is required to take as input a string  of
  870.          octets and to generate a single string of bits as its result.
  871.                Note 3 - Mechanisms for secure agreement on the  encryption  algorithm  and
  872.          its parameters by the sender and receiver of data are outside the scope  of  this
  873.          Recommendation.
  874.          8.5    In the case where a signature  must  be  appended  to  a  data  type,  the
  875.          following ASN.1 macro may be used to define the data type resulting from applying
  876.          a signature to the given data type.
  877.                SIGNED MACRO      ::=
  878.                BEGIN
  879.                TYPE NOTATION     ::=   type (ToBeSigned)
  880.                VALUE NOTATION    ::=   value (VALUE
  881.                   SEQUENCE{
  882.                       ToBeSigned,
  883.                       AlgorithmIdentifier,
  884.                       -- of the algorithm used to compute
  885.                       -- the signature
  886.                       ENCRYPTED OCTET STRING
  887.                       - -re the octet string is the result
  888.                       - -the hashing of the value of
  889.                       - -'ToBeSigned' --}
  890.                END - - of SIGNED.                  )
  891.          8.6    In the case where only the signature  is  required,  the  following  ASN.1
  892.          macro may be used to define the data type resulting from applying a signature  to
  893.          the given data type.  
  894.                SIGNATURE MACRO   ::=   
  895.                BEGIN  TYPE NOTATION          ::=   type (OfSignature)
  896.                VALUE NOTATION          ::=   value (VALUE
  897.                   SEQUENCE{
  898.                       AlgorithmIdentifier,
  899.                       -- of the algorithm used to compute
  900.                       -- the signature 
  901.                       ENCRYPTED OCTET STRING
  902.                       -- where the octet string is a function (e.g. a
  903.                       -- compressed or hashed version) of the
  904.                       -- value 'OfSignature', which may include
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  923.  
  924.                       -- the identifier of the algorithm used to
  925.                       -- compute the signature --}
  926.                END -- of SIGNATURE.          )
  927.          8.7    In order to enable the validation of  SIGNED  and  SIGNATURE  types  in  a
  928.          distributed environment, a distinguished encoding is  required.  A  distinguished
  929.          encoding of a SIGNED or SIGNATURE data value shall be obtained  by  applying  the
  930.          Basic  Encoding  Rules  defined  in  Recommendation  X.209  with  the   following
  931.          restrictions:
  932.                a)  the definite form of length encoding shall be  used,  encoded  in  the
  933.                   minimum number of octets;
  934.                b)  for string types, the constructed form of encoding shall not be used;
  935.                c)  if the value of a type is its default value, it shall be absent;
  936.                d)  the components of a Set type shall be encoded in  ascending  order  of
  937.                   their tag value;
  938.                e)  the components of a Set-of type shall be encoded in ascending order of
  939.                   their octet value;
  940.                f)  if the value of a Boolean type is true, the encoding  shall  have  its
  941.                   contents octet set to 'FF'16 ;
  942.                g)  each unused bits in the final octet of the  encoding  of  a  BitString
  943.                   value, if there are any, shall be set to zero;
  944.                h)  the encoding of a Real type shall be such that bases 8, 10 and 16 shall 
  945.                   not be used, and the binary scaling factor shall be zero.
  946.          9      Strong authentication procedures
  947.          9.1    Overview
  948.          9.1.1  The basic approach to authentication has been outlined above,  namely  the
  949.          corroboration of identity by demonstrating possession of a secret  key.  However,
  950.          many authentication procedures employing this approach are possible.  In  general
  951.          it is the business  of  a  specific  application  to  determine  the  appropriate
  952.          procedures, so as to meet the security policy of  the  application.  This  clause
  953.          describes three particular authentication procedures, which may be  found  useful
  954.          across a range of applications.
  955.                Note - This Recommendation does not specify the procedures  to  the  detail
  956.          required for implementation. However, additional  standards  could  be  envisaged
  957.          which would do so, either in an application-specific or in a general-purpose way.
  958.          9.1.2   The  three  procedures  involve  different  numbers   of   exchanges   of
  959.          authentication information, and consequently provide different types of assurance
  960.          to their participants.  Specifically,
  961.                a)  one way authentication, described in  9.2, involves a single  transfer
  962.                   of information  from  one  user  (A)  intended  for  another  (B),  and
  963.                   establishes the following:
  964.                   -   the identity of A, and that the authentication token  actually  was
  965.                       generated by A;
  966.                   -   the identity of B, and that the authentication token  actually  was
  967.                       intended to be sent to B;
  968.                   -   the integrity and "originality" (the property of  not  having  been
  969.                       sent  two  or  more  times)  of  the  authentication  token   being
  970.                       transferred.
  971.                   The latter properties can also be established for arbitrary  additional
  972.                   data accompanying the transfer;
  973.                b)  two-way authentication, described in  9.3, involves,  in  addition,  a
  974.                   reply from B to A.  
  975.                   It establishes, in addition, the following:
  976.                   -   that the authentication token generated in the reply  actually  was
  977.                       generated by B and was intended to be sent to A;
  978.                   -   the integrity and originality of the authentication token  sent  in
  979.                       the reply;
  980.                   -   (optionally) the mutual secrecy of part of the tokens;
  981.                c)  three-way authentication, described in  9.4, involves, in addition,  a
  982.                   further transfer from A to B. It establishes the same properties as the
  983.                   two-way authentication, but  does  so           without  the  need  for
  984.                   association time stamp checking.
  985.                In each case where Strong Authentication is to take place,  A  must  obtain
  986.          the public key of B, and the return certification path from B to A, prior to  any
  987.          exchange of information. This may involve access to the Directory,  as  described
  988.          in  7 above. Any such access is not mentioned again in  the  description  of  the
  989.  
  990.  
  991.  
  992.  
  993.          PAGE6   Fascicle VIII.8 - Rec.X.509
  994.  
  995.          procedures below.
  996.                The checking of timestamps as mentioned  in  the  following  sections  only
  997.          applies when either synchronized clocks are used in a local  environment,  or  if
  998.          clocks are logically synchronized by bilateral agreements. In  any  case,  it  is
  999.          recommended that Coordinated Universal Time be used.
  1000.                For each of the three authentication  procedures  described  below,  it  is
  1001.          assumed that party A has checked the validity of all of the certificates  in  the
  1002.          certification path.
  1003.          9.2    One-way authentication
  1004.                The following steps are involved, as depicted in Figure 7/X.509.
  1005.                                         FIGURE 7/X.509 - T0704440-88
  1006.  
  1007.                1)  A generates rA, a non-repeating number, which is used to detect replay
  1008.                   attacks and to prevent forgery.
  1009.                2)  A sends the following message to B:
  1010.                   B    A, A{tA, rA, B}
  1011.                   where tA is  a  timestamp.  tA  consists  of  one  or  two  dates:  the
  1012.                   generation time of the token (which is optional) and the  expire  date.
  1013.                   Alternatively, if data origin authentication  of  "sgnData"  is  to  be
  1014.                   provided by the digital signature:
  1015.                   B    A, A{tA, rA, B, sgnData}
  1016.                   In cases where information is to be conveyed which will subsequently be
  1017.                   used as a secret key (this information is referred to as "encData"):
  1018.                   B    A, A{tA, rA, B, sgnData, Bp[encData]}.
  1019.                   The use of "encData" as a secret key implies that  it  must  be  chosen
  1020.                   carefully, e.g. to be a strong key for whatever cryptosystem is used as
  1021.                   indicated in the "sgnData" field of the token.
  1022.                3)  B carries out the following actions:
  1023.                   a)  obtains Ap from B    A,  checking  that  A's  certificate  has  not
  1024.                       expired;
  1025.                   b)  verifies the signature,  and  thus  the  integrity  of  the  signed
  1026.                       information;
  1027.                   c)  checks that B itself is the intended recipient;
  1028.                   d)  checks that the timestamp is "current";
  1029.                   e)  optionally, checks that rA has not been replayed. This  could,  for
  1030.                       example, be achieved by having rA include a sequential part that is
  1031.                       checked by a local implementation for its value uniqueness.
  1032.                rA  is  valid  until  the  expire  date  indicated  by  tA,  rA  is  always
  1033.          accompanied by a sequential part, which indicates that  A  will  not  repeat  the
  1034.          token during the timerange tA and therefore that checking  of  the  value  of  rA
  1035.          itself is not required.
  1036.                In any case it is reasonable for party  B  to  store  the  sequential  part
  1037.          together with timestamp tA in the clear and together with the hashed part of  the
  1038.          token during timerange tA.
  1039.          9.3    Two-way authentication
  1040.                The following steps are involved, as depicted in Figure 8/X.509.
  1041.                                         FIGURE 8/X.509 - T0704450-88
  1042.  
  1043.                1)  as for  9.2.
  1044.                2)  as for  9.2.
  1045.                3)  as for  9.2.
  1046.                4)  B generates rB, a non-repeating number, used for similar purpose(s) to
  1047.                   rA.
  1048.                5)  B sends the following authentication token to A:
  1049.                   B {tB, rB, A, rA}
  1050.                   where tB is a timestamp defined in the same way as tA.
  1051.                   Alternatively, if data origin authentication  of  "sgnData"  is  to  be
  1052.                   provided by the digital signature:
  1053.                   B {tB, rB, A, rA, sgnData}
  1054.                   In cases where information is to be conveyed which will subsequently be
  1055.                   used as a secret key (this information is referred to as "encData"):
  1056.                   B {tB, rB, A, rA, sgnData, Ap[encData]}.
  1057.                   The use of "encData" as a secret key implies that  it  must  be  chosen
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  1065.  
  1066.                carefully, e.g. to be a strong key for whatever cryptosystem is used as
  1067.                   indicated in the "sgnData" field of the token.
  1068.                6)  A carries out the following actions:
  1069.                   a)  verifies the signature,  and  thus  the  integrity  of  the  signed
  1070.                       information;
  1071.                   b)  checks that A is the intended recipient;
  1072.                   c)  checks that the timestamp tB is "current";
  1073.                   d)  optionally, checks that rB has not been replayed [see  9.2 step  3)
  1074.                       e)].
  1075.          9.4    Three-way authentication
  1076.                The following steps are involved, as depicted in Figure 9/X.509.
  1077.                                         FIGURE 9/X.509 - T0704460-88
  1078.  
  1079.                1)  as for  9.3.
  1080.                2)  as for  9.3. Timestamp tA may be zero.
  1081.                3)  as for  9.3, except that the timestamp need not be checked.
  1082.                4)  as for  9.3.
  1083.                5)  as for  9.3. Timestamp tB may be zero.
  1084.                6)  as for  9.3, except that the timestamp need not be checked.
  1085.                7)  A checks that the received rA is identical to the rA which was sent.
  1086.                8)  A sends the following authentication token to B:
  1087.                   A{rB}.
  1088.                9)  B carries out the following actions:
  1089.                   a)   checks  the  signature  and  thus  the  integrity  of  the  signed
  1090.                       information;
  1091.                   b)  checks that the received rB is identical to the rB which  was  sent
  1092.                       by B.
  1093.          10     Management of keys and certificates
  1094.          10.1   Generation of key pairs
  1095.          10.1.1 The overall security management policy of an  implementation  will  define
  1096.          the lifecycle of key pairs, and is thus outstide the scope of the  authentication
  1097.          framework. However, it is vital to the overall  security  that  all  secret  keys
  1098.          remain known only to the user to whom they belong.
  1099.                Key data is not easy for a human user to remember,  so  a  suitable  method
  1100.          for storing it in  a  convenient  transportable  manner  must  be  employed.  One
  1101.          possible mechanism would be to use a "Smart Card". This would hold the secret and
  1102.          (optionally) public keys of the user, the user's certificate, and a copy  of  the
  1103.          certification authority's public key. The use of this card must  additionally  be
  1104.          secured by  e.g.  at  least  use  of  a  PIN  (Personal  Identification  Number),
  1105.          increasing the security of the system by requiring the user to possess  the  card
  1106.          and to know how to access it.  The exact method chosen  for  storing  such  data,
  1107.          however, is beyond the scope of this Recommendation.
  1108.          10.1.2 There are three ways in which a  user's  key  pair  may  be  produced,  as
  1109.          described in  10.1.2.1 to  10.1.2.3.
  1110.          10.1.2.1  The user generates its own key pair. This method has the advantage that
  1111.          a user's secret key is never released to another entity, but requires  a  certain
  1112.          level of competence by the user as described in Annex C.
  1113.          10.1.2.2  The key pair is generated by  a  third  party.  The  third  party  must
  1114.          release the secret key to the user in a physically secure manner,  then  actively
  1115.          destroy all information relating to the creation of the key pair  plus  the  keys
  1116.          themselves. Suitable physical security measures must be employed to  ensure  that
  1117.          the third party and the data operations are free from tampering.
  1118.          10.1.2.3  The key pair is generated by  the  CA.   This  is  a  special  case  of
  1119.           10.1.2.2, and the considerations there apply.
  1120.                Note - The certification authority already exhibits  trusted  functionality
  1121.          with respect to the user, and will be subject to the necessary physical  security
  1122.          measures. This method has the advantage of not requiring secure data transfer  to
  1123.          the CA for certification.
  1124.          10.1.2.4  The cryptosystem in use imposes particular (technical)  constraints  on
  1125.          key generation.
  1126.          10.2   Management of certificates
  1127.          10.2.1 A certificate associates the public key and unique distinguished  name  of
  1128.          the user it describes. Thus:
  1129.                a)  a certification authority must be satisfied of the identity of a  user
  1130.                   before creating a certificate for it;
  1131.  
  1132.  
  1133.  
  1134.  
  1135.          PAGE6   Fascicle VIII.8 - Rec.X.509
  1136.  
  1137.                b)  a certification authority must not issue certificates  for  two  users
  1138.                   with the same name.
  1139.          10.2.2 The production of a certificate occurs off-line and must not be  performed
  1140.          with an automatic query/response mechanism. The advantage of  this  certification
  1141.          is that because the secret key of the  certification  authority,  CAs,  is  never
  1142.          known except in the isolated and physically secure CA, the CA secret key may then
  1143.          only be learnt by an attack on CA itself, making compromise unlikely.
  1144.          10.2.3 It is important that the transfer  of  information  to  the  certification
  1145.          authority is not compromised, and suitable physical  security  measures  must  be
  1146.          taken. In this regard:
  1147.                a)  it would be a serious breach of security if the CA issued a certificate 
  1148.                   for a user with a public key that had been tampered with;
  1149.                b)  if the means of generation of key pairs of  10.1.2.3 is  employed,  no
  1150.                   secure transfer is needed;
  1151.                c)  if the means of generation of key pairs of  10.1.2.1 or of  10.1.2.2 is 
  1152.                   employed, the user may use different methods (on-line or  off-line)  to
  1153.                   communicate its public key to  the  CA  in  a  secure  manner.  On-line
  1154.                   methods may provide some additional flexibility for  remote  operations
  1155.                   performed between the user and the CA.
  1156.          10.2.4 A certificate is  a  publicly  available  piece  of  information,  and  no
  1157.          specific security measures need to be employed with respect to its transportation
  1158.          to the Directory. As it is produced by an off- line  certification  authority  on
  1159.          behalf of a user who will be given a copy of it, the user need  only  store  this
  1160.          information in its directory entry on  a  subsequent  access  to  the  Directory.
  1161.          Alternatively the CA could lodge the certificate for the user, in which case this
  1162.          agent must be given suitable access rights.
  1163.          10.2.5 Certificates will have a lifetime associated with  them,  at  the  end  of
  1164.          which they expire.  In order to provide  continuity  of  service,  the  CA  shall
  1165.          ensure   timely   availability   of   replacement   certificates   to   supersede
  1166.          expired/expiring certificates. This has a number  of  aspects,  as  described  in
  1167.           10.2.5.1 and 10.2.5.2.
  1168.          10.2.5.1  Validity of certificates may be designed so that each becomes valid  at
  1169.          the time of expiry of its predecessor, or an overlap may be allowed.  The  latter
  1170.          prevents the CA  from  having  to  install  and  distribute  a  large  number  of
  1171.          certificates that may run out at the same expiration date.
  1172.          10.2.5.2  Expired certificates will normally be removed from the Directory. It is
  1173.          a matter for the security policy  and  responsibility  of  the  CA  to  keep  old
  1174.          certificates for a period of time  if  a  non  repudiation  of  data  service  is
  1175.          provided.
  1176.          10.2.6 Certificates may be revoked prior to their expiration time,  e.g.  if  the
  1177.          user's secret key is assumed to be compromised, or the user is no  longer  to  be
  1178.          certified by the CA, or if the CA's certificate is  assumed  to  be  compromised.
  1179.          This has a number of aspects, as described in    10.2.6.1-10.2.6.4.
  1180.          10.2.6.1  The revocation of a user certificate or CA certificate  shall  be  made
  1181.          known by the CA, and a new certificate shall be made available,  if  appropriate.
  1182.          The CA may then inform the owner of the certificate about its revocation by  some
  1183.          off-line procedure.
  1184.          10.2.6.2  The CA shall maintain:
  1185.                a)  a time-stamped list of the certificates  it  issued  which  have  been
  1186.                   revoked;
  1187.                b)  a time-stamped list of revoked certificates of all CAs known to the CA, 
  1188.                   certified by the CA.
  1189.                Both certified lists shall exist, even if empty.
  1190.          10.2.6.3  The maintenance of Directory entries affected by  the  CA's  revocation
  1191.          lists is the responsibility of the Directory and its users, acting in  accordance
  1192.          with the security policy. For example, the user may modify its  object  entry  by
  1193.          replacing the old certificate with a new one. The latter will  then  be  used  to
  1194.          authenticate the user to the Directory.
  1195.          10.2.6.4  The  revocation  lists  ("black-lists")  are  held  within  entries  as
  1196.          attributes of types  "CertificateRevocationList"  and  "AuthorityRevocationList".
  1197.          These  attributes  can  be  operated  on  using  the  same  operations  as  other
  1198.          attributes. These attribute types are defined as follows:
  1199.                CertificateRevocationList     ::=   ATTRIBUTE
  1200.                   WITH ATTRIBUTE-SYNTAX CertificateList
  1201.                AuthorityRevocationList       ::=   ATTRIBUTE
  1202.  
  1203.  
  1204.  
  1205.  
  1206.                                                        Fascicle VIII.8 - Rec.X.509   PAGE1
  1207.  
  1208.                   WITH ATTRIBUTE-SYNTAX CertificateList
  1209.                CertificateList                     ::=   SIGNED SEQUENCE{
  1210.                   signature AlgorithmIdentifier,
  1211.                   issuer Name,
  1212.                   lastUpdate UTCTime,
  1213.                   revokedCertificates
  1214.                       SIGNED SEQUENCE OF SEQUENCE{
  1215.                          signature AlgorithmIdentifier,
  1216.                          issuer Name, CertificateSerialNumber subject,
  1217.                          revocationDate UTCTime}
  1218.                                     OPTIONAL}
  1219.                Note 1 - The checking of  the  entire  list  of  certificates  is  a  local
  1220.          matter.
  1221.                Note 2 - If  a  non-repudiation  of  data  service  is  dependent  on  keys
  1222.          provided by the CA the service must ensure that  all  relevant  keys  of  the  CA
  1223.          (revoked or expired) and  the  timestamped  revocation  lists  are  archived  and
  1224.          certified by a current authority.
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.          PAGE6   Fascicle VIII.8 - Rec.X.509
  1278.  
  1279.